package com.elisoft.emlap.agentmember.web;

import com.elisoft.emlap.agentmember.base.BaseController;
import com.elisoft.emlap.agentmember.common.Constant;
import com.elisoft.emlap.agentmember.service.AgentAppGoodsAPIService;
import com.elisoft.emlap.common.Result;
import com.elisoft.emlap.domain.AgentAppGoods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author wuyanshen
 * @Date 2018-12-11 2:37 PM
 * @Discription 描述
 */
@RestController
@RequestMapping("agentMember")
public class AgentMemberController extends BaseController {

    @Autowired
    private AgentAppGoodsAPIService agentAppGoodsAPIService;

    @Autowired
    private Constant constant;

    @GetMapping(value = "version")
    public String version(){
        return constant.getVersion();
    }

    @GetMapping(value = "goodsList")
    public Result goodsList() {
        return agentAppGoodsAPIService.findList(new AgentAppGoods());
    }
}
